package hn.cch.mybatis.plus.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import hn.cch.mybatis.plus.constant.Sex;


/**
 * mysql:t_model
 * oracle:t_model+s_model
 */
@TableName("t_model")
// @KeySequence("s_model")
public class ModelEntity extends Model<ModelEntity> {

    // 指定id为自动增长类型
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;



    @TableField(exist = false)// 表格不存在字段
    private String address;

    @Version
    private Integer version;// 乐观锁

    @TableLogic(value = "1", delval = "0")//'1-有效(未删除), 0-无效(已删除)'
    private Integer valid;// 有效性


    private Sex sex;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public Sex getSex() {
        return sex;
    }

    public void setSex(Sex sex) {
        this.sex = sex;
    }
}
